<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use App\Log;

class LogController extends Controller
{
    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct(Request $request)
    {
        $this->middleware('auth');

    }



    public function index(Request $request)
    {
        $where = array(1,2,3);
        $keyword = $request->input('keyword');
        $log = Log::orderBy("id", "asc");
        if (! empty($keyword)) {
            //$log = $log->where('name', 'like', "%$keyword%")->orwhere('email', 'like', "%$keyword%");

        }

        return view('log/index')->withLogs($log->paginate(15));
    }

    public function delete()
    {

    }
}
